package com.njegovanobradovic.icet.metamodel.beans;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

import org.springframework.transaction.annotation.Transactional;

import com.njegovanobradovic.icet.core.beans.BaseBean;
import com.njegovanobradovic.icet.metamodel.Chat;
import com.njegovanobradovic.icet.metamodel.Room;

@Entity
public class RoomBean extends BaseBean implements Room{

	private String name;
	private Chat chat;
	private Date date;
	
	@Basic
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@OneToOne(cascade={CascadeType.ALL}, targetEntity=ChatBean.class)
	public Chat getChat() {
		return chat;
	}
	public void setChat(Chat chat) {
		this.chat = chat;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}

}
